//
//  MedicineView.h
//  Pocket Doctor alpha version
//
//  Created by Sherif, Yin, Taylor, Jacob, Anna, Mike on 11-10-25.
//  Copyright (c) 2011 __Sytjam__. All rights reserved.
//
//Class Description: Displays the medicines added into the database and shows what type medication it is.
//                   Adding/Viewing/Deleting medicine can be achieved from here.
//
//Known Bugs: none.
//


#import <UIKit/UIKit.h>
#import "AppDelegate.h"

@class MainMenu;
@class AddMedicine;

@interface MedicineView : UIViewController <UIActionSheetDelegate, UIAlertViewDelegate>{
    
    //Class Views
    MainMenu *mm;
    AddMedicine *am;
    MedicineView *mv;
    
    //Point to the appDelegate for its SQLite database pointer.
    AppDelegate * aD;
    
    
    //Bar Buttons and Table
    UIBarButtonItem *add;
    UIBarButtonItem *back;
    UINavigationBar *navigationBar;
    UIBarButtonItem *editOrDone;
    UINavigationBar *bottomBar;
    UITableView *medicineView;
    UILabel *teach;
    UIImageView *teachArrow;
    
    NSMutableArray *medicinelist;
    NSMutableArray *medicineIDlist;
    NSMutableArray *medicineTypeList;
}

@property (retain,nonatomic) MainMenu *mm;
@property (retain,nonatomic) AddMedicine *am;
@property (retain,nonatomic) MedicineView *mv;
@property (retain,nonatomic) AppDelegate * aD;

@property(retain,nonatomic) IBOutlet UIBarButtonItem *add;
@property(retain,nonatomic) IBOutlet UIBarButtonItem *back;
@property(retain,nonatomic) IBOutlet UINavigationBar *navigationBar;
@property(retain,nonatomic) IBOutlet UIBarButtonItem *editOrDone;
@property(retain,nonatomic) IBOutlet UINavigationBar *bottomBar;
@property(retain,nonatomic) IBOutlet UITableView *medicineView;
@property(retain,nonatomic) IBOutlet UILabel *teach;
@property(retain,nonatomic) IBOutlet UIImageView *teachArrow;

@property(retain,nonatomic) NSMutableArray *medicinelist;
@property(retain,nonatomic) NSMutableArray *medicineIDlist;
@property(retain,nonatomic) NSMutableArray *medicineTypeList;

- (void)loadMedicineFromDB;
- (void)removeLocalNotifications:(int)medicineID;

- (IBAction)addMedicine:(id)sender;
- (IBAction)goBack:(id)sender;

@end
